<?
include("../config.php");
include("restringir.php");
include_once($rutaFisica."clases/DB.php");
include_once($rutaFisica."clases/Taller.php");
include_once($rutaFisica."funciones/funcionesphp.php");
$taller = new Taller();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Lista de Inscritos al taller:<? echo $_GET["nombre"];?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../css.css" rel="stylesheet" type="text/css">
</head>
<body onLoad="javascript: window.print();">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="30%" valign="top"><span class="LetraAzulMediana">Lista de inscritos 
      al taller:</span></td>
    <td width="54%" valign="top"><span class="LetraAzulMediana"><? echo urldecode($_GET["nombre"]);?></span></td>
    <td width="16%" align="center"><input name="Imprimir" type="button" id="Imprimir" value="Imprimir" onClick="javascript: window.print();"></td>
  </tr>
  <tr> 
    <td valign="top"><span class="LetraAzulMediana">Fecha y Horario:</span></td>
    <td valign="top"><span class="LetraAzulMediana"><? echo $_GET["fecha"];?> 
      / <? echo $_GET["horainicio"];?> - <? echo $_GET["horafin"];?></span></td>
    <td align="center"><input name="Cerrar" type="button" id="Cerrar" value="Cerrar" onClick="javascript: window.close();"></td>
  </tr>
  <tr>
    <td valign="top"><span class="LetraAzulMediana">Lugar:</span></td>
    <td valign="top"><span class="LetraAzulMediana"><? echo $_GET["lugar"];?></span></td>
    <td align="center">&nbsp;</td>
  </tr>
  <tr> 
    <td valign="top"><span class="LetraAzulMediana">Fecha de Impresi&oacute;n:</span></td>
    <td valign="top"><span class="LetraAzulMediana"><? echo date("d-m-Y");?></span></td>
    <td align="center">&nbsp;</td>
  </tr>
</table>
<p> 
</p>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
  <tr align="center" bgcolor="#000066"> 
    <td width="15%"><span class="LetraBlancaGrande">Id. Inscripci&oacute;n</span></td>
    <td width="15%"><span class="LetraBlancaGrande">N&uacute;mero de Cuenta</span></td>
    <td width="40%"><span class="LetraBlancaGrande">Nombre</span></td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td height="20" colspan="18" align="center">&nbsp;</td>
  </tr>
  <?
	include($rutaFisica."clases/Paginado.php");
	$sql = $taller->ObtenerListaInscritos($_GET["id"]);
	$paginado = new Paginado();
	$paginado->Sql($sql);
	$paginado->RegistrosPorPagina($_GET["cupo"]);
	$paginado->PaginaActual($_GET["pagina"]);
	$paginado->Variables($_SERVER["QUERY_STRING"]);
	for($i = 0; $row = @$paginado->RegresarRegistros($i); $i++)
	{
		$color = ($i % 2 == 0) ? "WHITE" : "#EBEBEB";
	?>
  <tr bgcolor="#FFFFFF"> 
    <td height="20" align="center"><span class="LetraAzulMedianaSB"><? echo $row["idinscripcion"];?></span></td>
    <td height="20" align="center"><span class="LetraAzulMedianaSB"><? echo $row["nocta"];?></span></td>
    <td height="20"><span class="LetraAzulMedianaSB"><? echo $row["apellidopaterno"];?> 
      <? echo $row["apellidomaterno"];?> <? echo $row["nombre"];?></span></td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td height="20">&nbsp;</td>
  </tr>
  <?
		$email .= $row["correoelectronico"] .", ";
	}
	$email = substr($email, 0, strlen($email) -2);
	?>
  <tr align="center" bgcolor="#FFFFFF"> 
    <td height="20" colspan="18" > <span class="LetraAzulChicaSB"> Total de inscritos: 
      <? 
		$paginado->Del();
        $paginado->Al();
		echo $paginado->TotalRegistros();
      	$paginado->Cerrar();
		?>
      </span> </td>
  </tr>
  <tr align="center" bgcolor="#FFFFFF">
    <td height="20" colspan="18" class="LetraAzulOChicaSB" >&nbsp;</td>
  </tr>
  <tr align="left" bgcolor="#FFFFFF"> 
    <td height="20" colspan="18" class="LetraAzulOChica" >E-mail de los inscritos:</td>
  </tr>
  <tr align="left" bgcolor="#FFFFFF"> 
    <td height="20" colspan="18" class="LetraAzulOChicaSB" ><? echo $email;?></td>
  </tr>
</table>
<br>
</body>
</html>
